<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <title>Hiring-找回密码</title>
         <%@ include file="/WEB-INF/views/common/import.jsp"%>
           <style>
	    	.password {
	    		width: 200px;
	    		display: inline;
	    	}
	    </style>
    </head>
    <body>
    	<div class="container">
    		<h1>发送重置密码邮件</h1>
    		<c:if test="${!empty msg}">
			<div class="alert alert-danger alert-dismissible fade in" role="alert">
		      <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="  ">×</span></button>
		      <strong>${msg }</strong>
		    </div>
	    </c:if>
			<form class="form-horizontal" role="form" novalidate="novalidate" action="<%=request.getContextPath()%>/CommonServlet?command=sendEmail" method="POST">
			  <input type="hidden" name="accountType" value="${param.accountType }"/>
			  <div class="form-group">
			    <label for="inputEmail3" class="col-sm-2 control-label">Email:</label>
			    <div class="col-sm-10">
			      <input type="email" class="form-control" id="inputEmail3" name="email" value="${email }">
			    </div>
			  </div>
			  <div class="form-group">
			    <label for="inputValidateCode" class="col-sm-2 control-label" >验证码:</label>
			    <div class="col-sm-10">
			      <input type="text" class="form-control password"  id="inputValidateCode" maxlength="4" name="validateCode" style="width:200px;" autocomplete="off" data-rule="required">
			      <img src="<%=request.getContextPath()%>/kaptcha.jpg" onclick="changePic(this)" width="90" height="30">
			    </div>
			  </div>
			  <div class="form-group">
			    <div class="col-sm-offset-2 col-sm-10">
			      <button type="submit" class="btn btn-default">发送</button>
			    </div>
			  </div>
			</form>
    	</div>
		<script>
			/**
			 * 更换验证码图片
			 */
			function changePic(obj) {
				obj.src='<%=request.getContextPath()%>/kaptcha.jpg?time=' + new Date().getTime();
			}
		</script>
    </body>
</html>
